global using System;

global using Bunit;

global using Xunit;
global using FluentAssertions;
global using FluentAssertions.BUnit;
global using BlamanticUI.Components;

using Microsoft.Extensions.DependencyInjection;


namespace BlamanticUI.Test;

public class TestBase
{
    private readonly ServiceProvider _serviceProvider;
    public TestBase()
    {
        Test = new TestContext();

        var service = new ServiceCollection();
        service.AddBlamanticUI();

        _serviceProvider = service.BuildServiceProvider();
        Test.Services.AddBlamanticUI();
    }
    protected TestContext Test { get; set; }

    protected TService? GetService<TService>() => _serviceProvider.GetService<TService>();
}
